package com.gh.ssyx.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gh.ssyx.model.acl.Permission;

import java.util.List;
import java.util.Map;

public interface PermissionService extends IService<Permission> {

    /**
     * 查询所有菜单
     * @return
     */
    List<Permission> queryAllPermission();

    /**
     * 递归删除菜单
     * @param id
     */
    void removeChildById(Long id);

    /**
     * 查看某个角色的权限列表
     * @param id
     * @return
     */
    List<Permission> toAssignPermission(Long id);

    /**
     * 给某个角色授权
     * @param roleId
     * @param permissionIds
     */
    void saveRolePermission(Long roleId, Long[] permissionIds);
}
